<div class="center">
	<a class="button preloader" href="<? echo redirect_str(PAGE_ADMIN_UPDATE); ?>" >PŘIDAT AKTUALIZACI</a><br /><br />
</div>

<br />

<table class="centered small-table">
  <tr>
    <th>vytvořeno</th>
    <th>verze</th>
    <th>obsah</th>
    <th>akce</th>
  </tr>
  
<?php

    $query = getAllAktualizace();
    $idx = 0;
    while($fetch = MySQL_Fetch_Array($query)){
      $id_aktualizace = $fetch["ID_AKTUALIZACE"];
      $datum = $fetch["DATUM"];
      $verze = $fetch["VERZE"];
      $obsah = $fetch["OBSAH"];
      
      if($idx % 2 == 0) { echo "<tr class='second'>"; }
      else echo "<tr>";
        echo "<td class='lefted'>".$datum."</td>";
        echo "<td>".$verze."</td>";
        echo "<td class='lefted'>".$obsah."</td>";
        echo "<td><a class='preloader' href=\"".redirect_str(PAGE_ADMIN_UPDATE).add_par("id_aktualizace=".$id_aktualizace)."\"'><img class='icon-btn' src='./img/icons/edit.png'></a>";
        echo "<a class='preloader' href=\"".redirect_str(PAGE_ADMIN_UPDATES).action(ACTION_DELETE_UPDATE).add_par("id_aktualizace=".$id_aktualizace)."\"><img class='icon-btn' src='./img/icons/delete.png'></a></td>";
      echo "</tr>";
      $idx ++;
    }
  ?>
</table>

